package com.jiang.service.Impl;

import com.jiang.bean.Student;
import com.jiang.dao.StuDao;
import com.jiang.service.StuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StuServiceImpl implements StuService {

    @Resource
    StuDao stuDao;

    @Override
    public int getStuCounts(String name) {
        return stuDao.getStuCounts(name);
    }

    @Override
    public List<Student> getAllStu(String name, int pageStart, int pageSize) {
        return stuDao.getAllStu(name, pageStart, pageSize);
    }

    @Override
    public int addStu(Student student) {
        return stuDao.addStu(student);
    }

    @Override
    public Student getUpdateStu(int id) {
        return stuDao.getUpdateStu(id);
    }

    @Override
    public int deleteStu(int id) {
        return stuDao.deleteStu(id);
    }

    @Override
    public int updateStu(Student student) {
        return stuDao.updateStu(student);
    }
}
